import request from '@/utils/request'




// 查询研究生信息列表
export function listStudent(query) {
  return request({
    url: '/mentor/student/list',
    method: 'get',
    params: query
  })
}

// 查询研究生信息详细
export function getStudent(id) {
  return request({
    url: '/mentor/student/' + id,
    method: 'get'
  })
}

// 新增研究生信息
export function addStudent(data) {
  return request({
    url: '/mentor/student',
    method: 'post',
    data: data
  })
}

// 修改研究生信息
export function updateStudent(data) {
  return request({
    url: '/mentor/student',
    method: 'put',
    data: data
  })
}

// 删除研究生信息
export function delStudent(id) {
  return request({
    url: '/mentor/student/' + id,
    method: 'delete'
  })
}

// 导出研究生信息
export function exportStudent(query) {
  return request({
    url: '/mentor/student/export',
    method: 'get',
    params: query
  })
}


// 获取研究生详细信息
export function getStudentDetailInfo(studentId) {
  return request({
    url: '/mentor/student/detail',
    method: 'get',
    params: {studentId}
  })
}

// 获取研究生详细信息
export function getStudentDetailByUserId(userId) {
  return request({
    url: '/mentor/student/detail/'+userId,
    method: 'get'
  })
}


// 添加学生信息
export function addStudentInfo(formData) {
  return request({
    url: '/mentor/student/addStudentInfo',
    method: 'post',
    data: formData
  })
}


// 管理员审核
export function changeStudentExamineStatus(adminName,status,studentId,message) {
  return request({
    url: '/mentor/student/examine',
    method: 'post',
    params: {adminName,status,studentId,message}
  })
}


// 导师选择,1学生主动选择，2管理员强制选择
export function chooseIns(insId,stuId,subId,type) {
  return request({
    url: '/mentor/student/chooseIns',
    method: 'post',
    params: {insId,stuId,subId,type}
  })
}

// 取消选择导师
export function cancelChooseIns(insId,stuId,subId) {
  return request({
    url: '/mentor/student/cancelChooseIns',
    method: 'post',
    params: {insId,stuId,subId}
  })
}

//老师拒绝后，学生需要点击确认按钮，才可继续选择导师
export function confirmStatus(stuId,insId) {
  return request({
    url: '/mentor/student/confirmStatus',
    method: 'post',
    params: {insId,stuId}
  })
}

//老师拒绝后，学生需要点击确认按钮，才可继续选择导师
export function exportStudentByInsId(insId) {
  return request({
    url: '/mentor/student/exportStudentByInsId',
    method: 'get',
    params: {insId}
  })
}






